package xm.control.bar.barContent
{
	import flash.display.DisplayObject;
	
	/**
	 * <br> 클래스 설명 : TabContent 에 삽입될 Button</br>
	 * @author 김정환
	 */	
	public class TabButton
	{
		
		//-----------------------------------------------------------------------------------
		// public vars
		//-----------------------------------------------------------------------------------
		
		/**
		 *  btn : DisplayObject
		 */		
		public var btn : DisplayObject;
		
		/**
		 *  icon : DisplayObject
		 */		
		public var icon : DisplayObject;
		
		
		//-----------------------------------------------------------------------------------
		// protected / internal vars
		//-----------------------------------------------------------------------------------
		
		
		
		
		//-----------------------------------------------------------------------------------
		// private vars
		//-----------------------------------------------------------------------------------
		
		
		
		
		//-----------------------------------------------------------------------------------
		// public functions
		//-----------------------------------------------------------------------------------
		
		/**
		 * constructor 
		 */	
		public function TabButton( btn:DisplayObject, icon:DisplayObject )
		{
			this.btn = btn;
			this.icon = icon;
		}
		
		/**
		 * destroy - 버튼과 아이콘 제거.
		 */		
		public function destroy():void
		{
			if( btn )
			{
				if( btn.parent ) btn.parent.removeChild( btn );
				btn = null;
			}
			
			if( icon ) 
			{
				if( icon.parent ) icon.parent.removeChild( icon );
				icon = null;
			}
		}
		
		
		//-----------------------------------------------------------------------------------
		// setter / getter
		//-----------------------------------------------------------------------------------
		
		
		
		//-----------------------------------------------------------------------------------
		// protected functions
		//-----------------------------------------------------------------------------------
		
		
		
		//-----------------------------------------------------------------------------------
		// internal functions
		//-----------------------------------------------------------------------------------
		
		
		
		
		//-----------------------------------------------------------------------------------
		// private functions
		//-----------------------------------------------------------------------------------
		
		
		
		//-----------------------------------------------------------------------------------
		// event handler
		//-----------------------------------------------------------------------------------
		
		
		
		
		
		
		
		
		
	}
}